package com.zc.demo.di;

import com.zc.demo.di.interfaces.Allegro;
import com.zc.demo.util.BaseTest;
import com.zc.demo.di.interfaces.InstrumentAnnotation;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;

/**
 * Created by zhangchi9 on 2016/11/3.
 */
public class ExecutionAnnotation extends BaseTest{

    @Autowired
    @Qualifier("guitarAnnotation")
    private InstrumentAnnotation instrumentAnnotation;
    @Autowired
    @Qualifier("saxophoneAnnotation")
    private InstrumentAnnotation saxophone;

    @Autowired
    @Allegro
    private InstrumentAnnotation allegro;

    @Value(value = "${twitter.accessToken}")
    private String token;

    @Test
    public void oneMethod(){
        instrumentAnnotation.play();
        saxophone.play();
        allegro.play();
        System.out.println(token);
    }


}
